<?php
declare (strict_types = 1);

namespace app\admin\controller;
use app\admin\model\Status;
use app\BaseController;
use think\facade\Db;
use think\facade\Request;
use think\facade\View;

class Order extends BaseController
{
    public function orderList()
    {
        $post = Request::param();
        $where=[];
        //订单号
        if (isset($post['order_sn']) && !empty($post['order_sn']))    $where['order_sn'] = $post['order_sn'];
        //时间区间
        if (isset($post['addtime']) && !empty($post['addtime']))    $where['addtime'] = $post['addtime'];
        if (isset($post['addtimes']) && !empty($post['addtimes']))    $where['addtimes'] = $post['addtimes'];
        //价格区间
        if (isset($post['d_price']) && $post['d_price']<>'')        $where['d_price'] = $post['d_price'];
        if (isset($post['g_price']) && $post['g_price']<>'')        $where['g_price'] = $post['g_price'];
        //订单状态
        if (isset($post['cid']) && $post['cid']<>'')        $where['cid'] = $post['cid'];


        $order = \app\admin\model\Order::getOrder($where,$post);

        View::assign('order',$order);

        $user = \app\admin\model\User::getUser();
        View::assign('user',$user);
        //订单状态查询

        $statu = Status::getStatus();
        View::assign('statu',$statu);
        View::assign($post);
        return view();
    }

    public function orderDetail()
    {
        return view();
    }
}







